<!--/Main Page-->
<?php 
$product = $db->select_one("SELECT * FROM products WHERE id = 1");
$box_sql = $db->select("SELECT * FROM box_product WHERE productID = 1  ");
?>
	<section>
	<div class="container">
				<div class="row">
			        <div class="col-sm-9">
			        	<div class="panel panel-default">
						  <div class="panel-body">
						    	<div class="pro_img"> <img class="img-responsive" width="250px" src="images/<?php echo $product['image']?>"> </div>
						    	<div class="pro_det">
					                <div class="full"> <?php echo $product['name']?> </div>
					                <div class="navbar-header">
					                <?php 
					                	foreach ($box_sql as $box_menu) {
					                ?>
					                  <a href="<?="#".$box_menu['id']?>" class="btn btn-default btn-sm"><?=$box_menu['box_name']?></a>
					                  
					                <?php 
					                   }
					                ?>  
					                </div>
					             </div>
						    	
						  </div>
						</div>
						
			
						
			        <?php 
			        	
			        	$i = 1;
			        	foreach ($box_sql as $box[$i]) {
			        
			        ?>
			        	<div class="panel panel-success" id="<?=$box[$i]['id']?>">
					      <div class="panel-heading">
					        <h3 class="panel-title" id="panel-title"><?php echo $box[$i]['box_name']?><a class="anchorjs-link" href="#panel-title"><span class="anchorjs-icon"></span></a></h3>
					      </div>
					      <div class="panel-body">
					         <?php 
					         	$sub_box_sql = $db->select("SELECT * FROM sub_box_product WHERE box_id = '{$box[$i]['box_id']}' ");
					         	$a = 1;
					         	foreach ($sub_box_sql as $sub_box[$a]) {
                                  
					         ?>
						       <div class="media">
							      <div class="media-left media-middle">
							        <a href="#">
							          <img class="media-object" data-src="holder.js/64x64" alt="64x64" src="images/<?php echo $sub_box[$a]['sub_box_image'];?>" data-holder-rendered="true" style="width: 130px;">
							        </a>
							      </div>
							      <div class="media-body">
							        <h4 class="media-heading" id="middle-aligned-media"><?php echo $sub_box[$a]['sub_box_name'];?><a class="anchorjs-link" href="#middle-aligned-media"><span class="anchorjs-icon"></span></a></h4>
							        <b class="box_desc"><?php echo $sub_box[$a]['sub_box_desc'];?></b>
							         <?php 
							          	@$options_sql[$a] = $db->select("SELECT * FROM box_options WHERE sub_box_id = '{$sub_box[$a]['sub_box_id']}' ORDER BY id DESC ");
							          	if($options_sql) {
										  $b = 1;
										  foreach ($options_sql[$a] as $options[$b]) {
							          ?>
							        	<div class="sel_area">
							        	<div class="radio" style="margin-top: 0px;margin-bottom: 0px;">
							        	 <label><input type="radio" name="<?php echo $options[$b]['name']?>" <?php if($b == 1) echo "checked";?> onclick="return price();" value="<?php echo $options[$b]['price_us'];?>"><a class="pull-left"><?php echo $options[$b]['title']?> <?php 
				                           if($options[$b]['image'] != '') {
                                              echo '<button  class="btn btn-default btn-xs" style="margin-top: 0px;" data-toggle="modal" data-target="#myModal'.$options[$b]['id'].'">'.$lang['9'].'</button>';
                                           }
				                          ?>
				                          <?php 
				                           if($options[$b]['more_information'] != '') {
				                          echo '<button href="'.$options[$b]['more_information'].'" class="btn btn-default btn-xs" style="margin-top: 0px;" target="_blank">'.$lang['10'].'</button>';
				                          }
				                          ?></a>
							        	 </label>
	
			                        	 
				                        </div>  
				                          

									<div id="myModal<?=$options[$b]['id']?>" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									  <div class="modal-dialog">
									    <div class="modal-content">
									        <div class="modal-body">
									            <img style="margin: 0px auto;" src="<?=base_url?>images/<?=$options[$b]['image']?>" class="img-responsive">
									            <p align="center"><?php echo $options[$b]['title']?> <b>(<?php echo $options[$b]['price_us'];?> <?=(isset($_SESSION['dollar'])?$_SESSION['dollar']:"USD")?>)</b></p>
									        </div>
									    </div>
									  </div>
									</div>
				                          
				                          
				                         </div>
				                       <?php 
				                        $b++;
				                         } // end for
				                       	} // end if
				                       
				                       ?>  
							      </div>
							   </div>
						     <?php 
						     $a++;
						     	} // end for sub box
						     
						     ?>  
						       
					      </div>
					    </div>
					    
					    <?php 
					    $i++;
					    }
					    ?>
					    
			        </div>
			        <div class="col-sm-3">
			        	<div class="panel panel-default">
					      <div class="panel-heading">
					        <h3 class="panel-title" id="panel-title"><?php echo $lang['6'];?><a class="anchorjs-link" href="#panel-title"><span class="anchorjs-icon"></span></a></h3>
					      </div>
					      <div class="panel-body">
					        	<div class="summary_price">$&nbsp;<span id="sum_tot_price">No Price</span> (<strong id="dollar_price"><?=(isset($_SESSION['dollar'])?$_SESSION['dollar']:"USD")?></strong>)</div>
					        	<div class="summary_details">
					              <div class="sum_free_ship">Free Shipping</div>
					              <div class="sum_link"> <a href="#">6, 12 or 18 months <br>
					                Special Financing</a> </div>
					              <div class="sum_butn">
					                <div class="btn-group">
								      
								      	<div class="pull-left" style="margin-left:10px;">
								      		<button onclick="return addCart()" type="button" class="btn btn-primary"><?php echo $lang['8'];?>
								      			<i class="fa fa-shopping-cart"></i>
								      		</button>
								      	</div>
								      
								     
								    
								    </div>
					               
					              </div>
					              <div class="full ma_11x"> <span class="bold fa_09e full bcolor">Available to ship :</span> <span class="full bcolor fa_08e">7 to 10 business days</span> <span class="bold fa_09e full bcolor ma_5x">Available for pickup :</span> <a href="#" class="full fa_08e">Check Availability</a> </div>
					            </div>
					      </div>
					    </div>
					    
					    <div class="panel panel-default">
					      <div class="panel-heading">
					        <h3 class="panel-title" id="panel-title"><?php echo $lang['7'];?><a class="anchorjs-link" href="#panel-title"><span class="anchorjs-icon"></span></a></h3>
					      </div>
					      <div class="panel-body">
					        	<div class="sum_spec">
					              <ul>
					                <li id="tv_spec">LG 55" 4K Ultra HD LED LCD 3D Capable Smart TV</li>
					                <li id="rv_spec">Onkyo 7.2 Channel TX-NR828 Network AV Receive</li>
					                <li id="sp_spec">Yamaha 5.1 Channel Speaker System - Black</li>
					                <li id="av_spec">Pioneer 3D Blu-ray Player</li>
					                <li id="ht_spec">Philips 3D Blu ray HTB-3580 Home Theatre System</li>
					                <li id="sb_spec">Sony 4.1 Channel Wireless Bluetooth Soundbar</li>
					             
					              </ul>
					            
					            </div>
					        	
					      </div>
					    </div>
					    
					    
			        </div>
			        
			        
		      	</div>
			
			</div>
	</section>
	